# $ANTLR 3.1.3 Mar 17, 2009 19:23:44 subpavadas.g 2011-11-14 20:20:55

import sys
from antlr3 import *
from antlr3.compat import set, frozenset


# for convenience in actions
HIDDEN = BaseRecognizer.HIDDEN

# token types
INTEGER=4
EOF=-1
T__8=8
T__7=7
T__6=6
T__5=5


class subpavadasLexer(Lexer):

    grammarFileName = "subpavadas.g"
    antlr_version = version_str_to_tuple("3.1.3 Mar 17, 2009 19:23:44")
    antlr_version_str = "3.1.3 Mar 17, 2009 19:23:44"

    def __init__(self, input=None, state=None):
        if state is None:
            state = RecognizerSharedState()
        super(subpavadasLexer, self).__init__(input, state)







    # $ANTLR start "T__5"
    def mT__5(self, ):

        try:
            _type = T__5
            _channel = DEFAULT_CHANNEL

            # subpavadas.g:7:6: ( '\\n' )
            # subpavadas.g:7:8: '\\n'
            pass 
            self.match(10)



            self._state.type = _type
            self._state.channel = _channel

        finally:

            pass

    # $ANTLR end "T__5"



    # $ANTLR start "T__6"
    def mT__6(self, ):

        try:
            _type = T__6
            _channel = DEFAULT_CHANNEL

            # subpavadas.g:8:6: ( '(' )
            # subpavadas.g:8:8: '('
            pass 
            self.match(40)



            self._state.type = _type
            self._state.channel = _channel

        finally:

            pass

    # $ANTLR end "T__6"



    # $ANTLR start "T__7"
    def mT__7(self, ):

        try:
            _type = T__7
            _channel = DEFAULT_CHANNEL

            # subpavadas.g:9:6: ( ')' )
            # subpavadas.g:9:8: ')'
            pass 
            self.match(41)



            self._state.type = _type
            self._state.channel = _channel

        finally:

            pass

    # $ANTLR end "T__7"



    # $ANTLR start "T__8"
    def mT__8(self, ):

        try:
            _type = T__8
            _channel = DEFAULT_CHANNEL

            # subpavadas.g:10:6: ( '+' )
            # subpavadas.g:10:8: '+'
            pass 
            self.match(43)



            self._state.type = _type
            self._state.channel = _channel

        finally:

            pass

    # $ANTLR end "T__8"



    # $ANTLR start "INTEGER"
    def mINTEGER(self, ):

        try:
            _type = INTEGER
            _channel = DEFAULT_CHANNEL

            # subpavadas.g:13:8: ( ( '0' .. '9' )+ )
            # subpavadas.g:13:10: ( '0' .. '9' )+
            pass 
            # subpavadas.g:13:10: ( '0' .. '9' )+
            cnt1 = 0
            while True: #loop1
                alt1 = 2
                LA1_0 = self.input.LA(1)

                if ((48 <= LA1_0 <= 57)) :
                    alt1 = 1


                if alt1 == 1:
                    # subpavadas.g:13:11: '0' .. '9'
                    pass 
                    self.matchRange(48, 57)


                else:
                    if cnt1 >= 1:
                        break #loop1

                    eee = EarlyExitException(1, self.input)
                    raise eee

                cnt1 += 1



            self._state.type = _type
            self._state.channel = _channel

        finally:

            pass

    # $ANTLR end "INTEGER"



    def mTokens(self):
        # subpavadas.g:1:8: ( T__5 | T__6 | T__7 | T__8 | INTEGER )
        alt2 = 5
        LA2 = self.input.LA(1)
        if LA2 == 10:
            alt2 = 1
        elif LA2 == 40:
            alt2 = 2
        elif LA2 == 41:
            alt2 = 3
        elif LA2 == 43:
            alt2 = 4
        elif LA2 == 48 or LA2 == 49 or LA2 == 50 or LA2 == 51 or LA2 == 52 or LA2 == 53 or LA2 == 54 or LA2 == 55 or LA2 == 56 or LA2 == 57:
            alt2 = 5
        else:
            nvae = NoViableAltException("", 2, 0, self.input)

            raise nvae

        if alt2 == 1:
            # subpavadas.g:1:10: T__5
            pass 
            self.mT__5()


        elif alt2 == 2:
            # subpavadas.g:1:15: T__6
            pass 
            self.mT__6()


        elif alt2 == 3:
            # subpavadas.g:1:20: T__7
            pass 
            self.mT__7()


        elif alt2 == 4:
            # subpavadas.g:1:25: T__8
            pass 
            self.mT__8()


        elif alt2 == 5:
            # subpavadas.g:1:30: INTEGER
            pass 
            self.mINTEGER()







 



def main(argv, stdin=sys.stdin, stdout=sys.stdout, stderr=sys.stderr):
    from antlr3.main import LexerMain
    main = LexerMain(subpavadasLexer)
    main.stdin = stdin
    main.stdout = stdout
    main.stderr = stderr
    main.execute(argv)


if __name__ == '__main__':
    main(sys.argv)
